package cn.tedu.task;

import javax.swing.*;

/**
 * 设计炸弹类
 */
public class Bomb extends SeaObject {
    /**
     * Instantiates a new Bomb.
     *
     * @param x the x
     * @param y the y
     */
    public Bomb(int x,int y){
        super(9,12,x,y,3);
    }

   @Override
    public void move(){
       y+=speed;
    }


    public ImageIcon getImage(){
        return Images.bomb; //返回炸弹图片
    }

    /**检测深水炸弹是否越界*/
    @Override
    public boolean isOutOfBounds(){
        return y>=World.HEIGHT;
    }

}


















